<template>
	<div id="order_pk_list">
		

		<el-table
			ref="table"
			:data="list"
			stripe
			v-loading="loading"
			@selection-change="handleSelectionChange">
			<el-table-column :selectable="handleSelectable" type="selection"></el-table-column>
			<el-table-column align="center" label="礼品信息">
				<template slot-scope="scope">
					<div class="goods_info">
						<div class="goods_img">
							<el-image fit="cover" :src="scope.row.cover | fullPath" :preview-src-list="[$common.getUrl(scope.row.cover)]" style="width:100px; height:100px">
							</el-image>
						</div>
						<div class="goods_text">
							<span> {{scope.row.goodsName}}</span>
							<span>*{{scope.row.goodsNum}}</span>
						</div>
					</div>
				</template>
			</el-table-column>
			<el-table-column
				label="分站"
				align="center">
				<template slot-scope="scope">
					<span v-for="item in tenantList" v-if="item.id == scope.row.tenant_id">{{item.company}}</span>
				</template>
			</el-table-column>
			<el-table-column
				label="仓库"
				align="center">
				<template slot-scope="scope">
					<span v-for="item in storeList" v-if="item.id == scope.row.store_id">{{giftStoreList[item.other_type]}}{{item.name}}</span>
				</template>
			</el-table-column>
			<el-table-column align="center" label="订单信息"  min-width="150">
				<template slot-scope="scope">
					<div class="order">
						<p>订单状态：<span v-if="scope.row.status == 0">待付款</span>
									<span v-if="scope.row.status == 1">待发货</span>
									<span v-if="scope.row.status == 2">已发货</span>
									<span v-if="scope.row.status == 4">已退款</span>
									<span v-if="scope.row.status == 6">交易成功</span>
									<span v-if="scope.row.status == -1">撤销订单</span>
						</p>
						<p>订单ID：{{scope.row.orderId}}</p>
						<p>包裹ID：{{scope.row.id}}</p>
						<p>商家Id：{{scope.row.busId}} {{(scope.row.busParentId && scope.row.busParentId>0)?"上级:"+scope.row.busParentId:""}}</p>
						<p>平台类型：<span v-if="scope.row.belongTerrace== 1">其他</span>
									<span v-if="scope.row.belongTerrace== 2">淘宝/天猫</span>
									<span v-if="scope.row.belongTerrace== 3">京东</span>
									<span v-if="scope.row.belongTerrace== 4">拼多多</span>
									<span v-if="scope.row.belongTerrace== 5">抖音</span>
						</p>
						<p>订单金额：{{scope.row.amount}}元</p>
					</div>
				</template>
			</el-table-column>
			<el-table-column align="center" label="收件人信息" min-width="150">
				<template slot-scope="scope">
					<div class="order">
						<p>收件人：{{scope.row.name}}</p>
						<p>收件人电话：{{scope.row.phone}}</p>
						<p>收件人地址：{{scope.row.province}}{{scope.row.city}}{{scope.row.county}}{{scope.row.address}}</p>
						<p>第三方订单号：{{scope.row.orderNo}}</p>
					</div>
				</template>
			</el-table-column>
			<el-table-column label="状态" align="center">
				<template slot-scope="scope" >
					<span v-if="scope.row.status === 0" class="warning">待付款</span>
					<span v-if="scope.row.status === 1">待发货</span>
					<span v-if="scope.row.status === 2">已发货</span>
					<span v-if="scope.row.status === 4">已退款</span>
					<span v-if="scope.row.status === 6" class="success">发货完成</span>
					<span v-if="scope.row.status === -1" class="error">订单撤销</span>

					<span v-if="scope.row.otherType==1 && scope.row.otherStatus==-1 && scope.row.status === 1"><br>不可获取</span>
					<span v-if="scope.row.otherType==1 && scope.row.otherStatus==0 && scope.row.status === 1"><br>待获取</span>
					<span v-if="scope.row.otherType==1 && scope.row.otherStatus==1 && scope.row.status === 1"><br>获取成功</span>
					<span v-if="scope.row.otherType==1 && scope.row.otherStatus==2 && scope.row.status === 1"><br>获取失败</span>

					<span v-if="scope.row.otherType==5 && scope.row.otherStatus==0 && scope.row.status === 1"><br>未推送</span>
					<span v-if="scope.row.otherType==5 && scope.row.otherStatus==1 && scope.row.status === 1"><br>推送成功</span>
					<span v-if="scope.row.otherType==5 && scope.row.otherStatus==2 && scope.row.status === 1"><br>推送失败</span>
					<span v-if="scope.row.otherType==5 && scope.row.otherStatus==3 && scope.row.status === 1"><br>推送成功但未返回单号</span>

					<span v-if="scope.row.otherType!=5 && scope.row.otherType!=1 && scope.row.otherStatus==0 && scope.row.status === 1"><br>待推送</span>
					<span v-if="scope.row.otherType!=5 && scope.row.otherType!=1 && scope.row.otherStatus==1 && scope.row.status === 1"><br>推送成功</span>
					<span v-if="scope.row.otherType!=5 && scope.row.otherType!=1 && scope.row.otherStatus==2 && scope.row.status === 1"><br>推送失败</span>
				</template>
			</el-table-column>
			<el-table-column align="center" label="创建时间">
				<template slot-scope="scope">
					{{$common.getDate(scope.row.create_time)}}
				</template>
			</el-table-column>
			<el-table-column fixed="right" align="center" label="操作">
				<template slot-scope="scope">
					<p><el-button type="danger" @click="refund(scope.row)" size="small" v-if="scope.row.status==0 || scope.row.status==1">退款</el-button></p>
					<p class="margin_top5"><el-button type="success" @click="getExpressNo(scope.row.id)" size="small" v-if="scope.row.status==1 && scope.row.other_type==5 && scope.row.other_status==3">获取快递单号</el-button></p>
					<p class="margin_top5"><el-button type="primary" size="small" v-if="scope.row.dzmd_status ==1 || scope.row.dzmd_status ==2" @click="print(scope.row)">{{scope.row.dzmd_status==2?'已打印':'打印'}}</el-button></p>
				</template>
			</el-table-column>
		</el-table>

		<a class="btnPrint" id="print_order" href="javascript:;" style="display:none">dy</a>

		<el-pagination
			class="page"
			background
			@size-change="handleSizeChange"
			@current-change="getNewList"
			:current-page.sync="params.pageNo"
			:page-sizes="[10, 20, 50, 100 ,200,500,1000]"
			:page-size="params.pageSize"
			layout="total, sizes, prev, pager, next, jumper"
			:total="total">
		</el-pagination>
	</div>
</template>

<script>
import '@/utils/print'
	export default {
		data() {
			return {
				socket: new WebSocket('ws://localhost:13528'),
				pddSocket: new WebSocket('ws://localhost:5000'),
				params: {
					id: '',
					pageNo: 1,
					pageSize: 10,
					isCount: true,
					tenantId: '',
					orderId: '',
					orderNo: '',
					belongTerrace: '',
					expressNo: '',
					expressSheetId: '',
					goodsId: '',
					status: '',
					province: '',
					city: '',
					county: '',
					dzmdStatus:'',
					templateStatus:'',
					storeId: '',
					busId:'',
					busParentId:'',
					goodsNum:'',
					oldType:1,
				},
				list: [],
				total: 0,
				loading: false,
				selectData: [],
				tableCheckedList: [],
				tenantList: [],
				goodsList: [],
				timeArr: [],
				storeList: [],
				expressSheet:[],
				expressSheetList:[],
				giftStoreList:['','','爱代发-','就代发-','瑶瑶-','星辰-',"海淘-","代发发-"],
				oldTypeList: [
					{ value: 1, label: '新数据' },
					{ value: 2, label: '旧数据' },
				],
			};
		},

		watch: {},

		created() {
			this.getTenantList()
			this.getGoodsList()
			this.getAllStoreList()
		},

		mounted() {
			var id = this.$route.query.id;
			if(id) {
				this.params.orderId = id;
			}
			var oldType = this.$route.query.oldType;
			if(oldType){
				this.params.oldType = Number(oldType)
			}
			//this.getList();
			this.getNewList();
			this.getCount();
			this.$nextTick(res => {
				$(".btnPrint").printPage();
			})
			this.doConnect();
			this.pddDoConnect();
		},

		methods: {
			
			getExpressNo(id){
				this.loading = true
				this.$request.post({
					url: 'ad/pkInfo/getExpressNo',
					params:{
						id
					},
					success: result=>{
						this.$message.success('更新成功')
						this.getNewList();
					},
					finally: ()=>{
						this.loading = false
					}
				})
			},
			
			templateStatusChange(num){
				if(num){
					this.params.expressSheetId = ''
					this.expressSheetList = []
					this.expressSheet.forEach(item => {
						if(num == item.expressStatus){
							if(item.expressStatus === 1){
								item.itemName = '通用电子面单'
							}
							if(item.expressStatus === 2){
								item.itemName = '菜鸟电子面单'
							}
							if(item.expressStatus === 3){
								item.itemName = '拼多多面单'
							}
							item.itemName = item.itemName + '-' + item.shipperName + '-' +item.company
							this.expressSheetList.push(item)
						}
					})
				}else{
					this.expressSheetList = []
					this.expressSheet.forEach(item => {
						if(item.expressStatus === 0){
							item.itemName = '其他面单'
						}
						if(item.expressStatus === 1){
							item.itemName = '通用电子面单'
						}
						if(item.expressStatus === 2){
							item.itemName = '菜鸟电子面单'
						}
						if(item.expressStatus === 3){
							item.itemName = '拼多多面单'
						}
						item.itemName = item.itemName + '-' + item.shipperName + '-' +item.company
						this.expressSheetList.push(item)
					})
				}
			},
			storeChange(id){
				if(id){
					this.getExpressSheetList(id)
				}else{
					this.expressSheetList = []
				}
				this.params.templateStatus = ''
				this.params.expressSheetId = ''
				this.search()
			},
			getExpressSheetList(id){
				this.$request.post({
					url: '/ad/expressSheet/allList',
					params:{
						storeId:id
					},
					success:res => {
						this.expressSheet = res
						this.expressSheetList = []
						res.forEach(item => {
							if(item.expressStatus === 0){
								item.itemName = '其他面单'
							}
							if(item.expressStatus === 1){
								item.itemName = '通用电子面单'
							}
							if(item.expressStatus === 2){
								item.itemName = '菜鸟电子面单'
							}
							if(item.expressStatus === 3){
								item.itemName = '拼多多面单'
							}
							item.itemName = item.itemName + '-' + item.shipperName + '-' +item.company
							this.expressSheetList.push(item)
						})
					}
				})
			},
			getAllStoreList(){
				this.$request.post({
					url: '/ReportApi/admin/storetlist',
					success: res => {
						this.storeList = res
					}
				})
			},
			exportExcel(){
				let _this = this
				if(this.loading) return
				this.loading = true
				let postData = this.$qs.stringify(this.params);
				this.$axios.post("/ad/pkInfo/exportList",postData,{
					responseType: 'blob',
				}).then(function(res) {
					var a = document.createElement('a');
					var url = window.URL.createObjectURL(res.data);
					var filename = '包裹列表-' + _this.$common.getDate(new Date().getTime()) + '.xls';
					a.href = url;
					a.download = filename;
					a.click();
					_this.loading = false
					window.URL.revokeObjectURL(url);
				}).catch(function(error) {
					console.log(error);
				})
			},
			copy(){
				var input = document.createElement("textarea");
				for(var i = 0; i < this.list.length; i++){
					input.value += (this.list[i].id + "\n");
				}
				document.body.appendChild(input);
				input.select();
				input.setSelectionRange(0, input.value.length), document.execCommand('Copy');
				document.body.removeChild(input);
				this.$message.success('复制成功!');
			},
			getGoodsList(){
				this.$request.post({
					url: '/ReportApi/admin/goodlist',
					success: res => {
						this.goodsList = res
					}
				})
			},
			getTenantList(){
				this.$request.post({
					url: '/ReportApi/admin/tenantlist',
					success: res => {
						this.tenantList = res
					}
				})
			},
			handleSelectable(row,index){
				if(row.dzmdStatus !== 0 && row.status !=4){
					return true
				}else{
					return false
				}
			},
			print(row){//有row值为单条数据打印，没有row值为批量打印
				if(this.loading) return;
				this.loading = true;
				const loading = this.$loading();
				var templateStatus = '';
				let idStr = ''
				if(row){
					idStr = row.id
					templateStatus = row.templateStatus;
				}else{
					this.tableCheckedList.forEach((res,index) => {
						let length = this.tableCheckedList.length
						if(index < length -1){
							idStr += res.id + ','
						}else{
							idStr += res.id
						}
					})
					templateStatus = this.params.templateStatus;
				}
				if(templateStatus == ''){
					this.$message.warning('请选择一种面单类型在进行批量打印')
					this.loading = false
					loading.close();
					return
				}
				this.updateDzmdStatus(idStr)
				if(templateStatus==1){
					$("#print_order").attr("href",'/admin/static/html/print.html?id=' + idStr + '&oldType='+this.params.oldType);
					$("#print_order").click()
					this.loading = false
					loading.close();
				}else if(templateStatus==2 || templateStatus==3){
					this.$request.post({
						url: 'ad/pkInfo/getPrintTemplate',
						params: {idStr:idStr,oldType:this.params.oldType},
						success: result =>{
							for(var i=0;i<result.length;i++){
								if(templateStatus==2){
									this.doPrint(result[i]);
								}else if(templateStatus==3){
									this.pddDoPrint(result[i]);
								}
							}
						},
						finally: ()=>{
							this.loading = false
							loading.close();
						}
					})
				}

			},
			handleSelectionChange(e){
				this.tableCheckedList = e
			},
			handleSizeChange(value) {
				this.params.pageSize = value
				this.params.pageNo = 1
				this.params.isCount = true
				this.getNewList();
				//this.search()
			},
			//更新包裹打印状态不能删
			updateDzmdStatus(idStr){
				this.$request.post({
					url: '/ad/pkInfo/updateDzmdStatus',
					params: {
						idStr:idStr,
						oldType:this.params.oldType
					},
				})
			},
			search(){
				this.params.pageNo = 1
				this.params.isCount = true
				//this.getList();
				this.getNewList();
				this.getCount();
			},
			timeChange(val){
				if(val){
					this.params.startTime = this.$common.getDate(val[0]);
					this.params.endTime = this.$common.getDate(val[1]);
				}else{
					this.params.startTime = ''
					this.params.endTime = ''
				}
			},
			// getList() {
			// 	this.loading = true
			// 	this.$request.post({
			// 		url: 'ad/pkInfo/list',
			// 		params: this.params,
			// 		success: result =>{
			// 			this.list = result.list
			// 			if(this.params.isCount){
			// 				this.params.isCount = false
			// 				this.total = result.total
			// 			}
			// 		},
			// 		finally: ()=>{
			// 			this.loading = false
			// 		}
			// 	})
			// },
			getNewList() {
				this.loading = true
				this.$request.post({
					url: '/ReportApi/admin/orderlists',
					params: this.params,
					success: result =>{
						this.list = result[0]
						this.total = result[1]
					},
					finally: ()=>{
						this.loading = false
					}
				})
			},
			// getCount() {
			// 	this.$request.post({
			// 		url: 'ad/pkInfo/count',
			// 		params: this.params,
			// 		success: result =>{
			// 			this.total = result
			// 		},
			// 		finally: ()=>{
			// 		}
			// 	})
			// },
			refund(row){
				this.$confirm('确定退款?', '退款', {
				confirmButtonText: '确定',
				cancelButtonText: '取消',
				type: 'warning'
				}).then(() => {
					this.loading = true
					this.$request.post({
						url: '/ReportApi/admin/refund',
						params: {id:row.id},
						success: result =>{
							this.$message.success('退款成功');
							row.status = 4;
						},
						finally: ()=>{
							this.loading = false
							this.getNewList();
						}
					})
				}).catch(() => {
				});
			},
		

			//菜鸟打印
			doConnect() {
				var that = this;
				// this.socket = new WebSocket('ws://localhost:13528');
				console.log(this.socket)
				//如果是https的话，端口是13529
				//socket = new WebSocket('wss://localhost:13529');
				// 打开Socket

				that.socket.onopen = function(event) {
					// 监听消息
					that.socket.onmessage = function(event) {
						var printResult = JSON.parse(event.data);
						// layer.load();
						if (printResult.cmd == 'print' && (printResult.msg == '成功' || printResult.status == 'success')) {
							//打印成功--做一些自己的处理

						} else if (printResult.msg == '无效的打印机' || printResult.status == 'failed') {
							//打印失败--做一些自己的处理
							that.$message.error(printResult.msg)
						}
					};
					// 监听Socket的关闭
					that.socket.onclose = function(event) {
						console.log('Client notified socket has closed', event);
					};
				};
			},

			doPrint(row) {
				var remark = row.goodsName+"-"+row.goodsNum;
				// var remark = row.goodsRemark+"-"+row.goodsNum;
				var printData = JSON.parse(row.printTemplate);
				var request = {
					"cmd": "print",
					"requestID": Date.parse(new Date()),
					"version": "1.0",
					"task": {
						"taskID": "DY"+row.id,
						"preview": false,
						"printer": "",
						// "previewType": "pdf",
						// "firstDocumentNumber": 10,
						// "totalDocumentCount": 100,
						"documents": [{
							"documentID": "",
							"contents": [
								printData
								,{
									"data": {
										"value": remark
									},
									// "templateURL":"http://cloudprint.cainiao.com/template/customArea/11615473/5"
									"templateURL": window.location.protocol+"//"+window.location.host+"/admin/cainiao.layout"
								}
								// {
								// 	"info": "info"
								// }, //基本信息
								// {
								// 	"data": {
								// 		"_dataFrom": "waybill",
								// 		"adsInfo": {
								// 			"adId": "382",
								// 			"advertisementType": "COMMERCIAL",
								// 			"bannerUrl": "http://ad-cdn.cainiao.com/7/1592469651355.jpg",
								// 			"miniBannerUrl": "http://ad-cdn.cainiao.com/7/1592469644331.jpg",
								// 			"trackUrl": "https://ad.cainiao.com/YtVx6Zj"
								// 		},
								// 		"cpCode": "STO",
								// 		"needEncrypt": false,
								// 		"packageInfo": {
								// 			"items": [
								// 				{
								// 					"count": 1,
								// 					"name": "bjb*1;"
								// 				}
								// 			],
								// 			"volume": 0,
								// 			"weight": 0
								// 		},
								// 		"parent": false,
								// 		"recipient": {
								// 			"address": {
								// 				"city": "中山市",
								// 				"detail": "广东省 中山市 小榄镇 民安中路",
								// 				"province": "广东省",
								// 				"town": "小榄镇"
								// 			},
								// 			"name": "黄生",
								// 			"phone": "15398888567"
								// 		},
								// 		"routingInfo": {
								// 			"consolidation": {
								// 				"name": "中山中转包"
								// 			},
								// 			"origin": {
								// 				"code": "322000",
								// 				"name": "浙江义乌公司"
								// 			},
								// 			"receiveBranch": {
								// 				"code": "510502"
								// 			},
								// 			"routeCode": "L16 594",
								// 			"sortation": {
								// 				"name": "610"
								// 			},
								// 			"startCenter": {},
								// 			"terminalCenter": {}
								// 		},
								// 		"sender": {
								// 			"address": {
								// 				"city": "金华市",
								// 				"detail": "孝顺镇大湖沿南小区",
								// 				"district": "金东区",
								// 				"province": "浙江省"
								// 			},
								// 			"mobile": "13156785659",
								// 			"name": "余先生"
								// 		},
								// 		"shippingOption": {
								// 			"code": "STANDARD_EXPRESS",
								// 			"title": "标准快递"
								// 		},
								// 		"waybillCode": "773046964851108"
								// 	},
								// 	"signature": "MD:nNbwXwqkz+skMvBNJ47rbA==",
								// 	"templateURL": "http://cloudprint.cainiao.com/template/standard/288948/44"
								// }
							]
						}]
					}
				};
				this.socket.send(JSON.stringify(request));
			},

			getUUID(len, radix) {
				var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
				var uuid = [];
				radix = radix || chars.length;

				if (len) {
					for (var i = 0; i < Number(len); i++) {
						uuid[i] = chars[0 | Math.random() * radix]
					};
				} else {
					var r;
					uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
					uuid[14] = '4';
					for (var j = 0; j < 36; j++) {
						if (!uuid[j]) {
							r = 0 | Math.random() * 16;
							uuid[j] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
						}
					}
				}
				return uuid.join('');

			},
			errorTip() { //失败德提示
				this.$message.error('打印失败')
			},

			//拼多多打印
			pddDoConnect() {
				var that = this;
				// this.socket = new WebSocket('ws://localhost:13528');
				console.log(that.pddSocket)
				//如果是https的话，端口是13529
				//socket = new WebSocket('wss://localhost:13529');
				// 打开Socket

				that.pddSocket.onopen = function(event) {
					// 监听消息
					that.pddSocket.onmessage = function(event) {
						console.log(event.data)
						var printResult = JSON.parse(event.data);
						// layer.load();
						if (printResult.cmd == 'print' && (printResult.msg == '成功' || printResult.status == 'success')) {
							//打印成功--做一些自己的处理
						} else if (printResult.msg == '无效的打印机' || printResult.status == 'failed') {
							//打印失败--做一些自己的处理
							that.$message.error(printResult.msg?printResult.msg:'打印失败')
						}
					};
					// 监听Socket的关闭
					that.pddSocket.onclose = function(event) {
						console.log('Client notified socket has closed', event);
					};
				};
			},

			pddDoPrint(row) {
				var remark = row.goodsName+"-"+row.goodsNum;
				// var remark = row.goodsRemark+"-"+row.goodsNum;
				var printData = JSON.parse(row.printTemplate);
				var request = {
					// "ERPId":303379400,
					"cmd":"print",
					"requestID":Date.parse(new Date())+"",
					"task":{
						"documents":[
							{
								"contents":[
									printData
									// {
									// 	"addData":{
									// 		"sender":{
									// 			"address":{
									// 				"city":"上海市",
									// 				"detail":"陕西面馆",
									// 				"district":"长宁区",
									// 				"province":"上海市"
									// 			},
									// 			"mobile":"333333333333",
									// 			"name":"ceshi"
									// 		}
									// 	},
									// 	"encryptedData":"35803c72f596cb6aeeb2bf7249968965aa24ecba756f3e127d50c315d4e06cd5013899573a4d598eaf81a75556cca13c5ebab13723ddf1599dc5618f644baef72c78a170acd67233e1c271dafd8f34a43b70e1b4f16746a6b5febc112049fa2074f2cd3745a79d3ea0700cc8fafb9ef81ee5656ea541d26ce34eacad30c78739aa578c0ae34481dd9939b745aa9fb50009b2d5a09513225ee58664b5d5158d6780a9bab857c0c3c59faf514580324c56e6553fc44ab9c40fb1e57c0953fddae580c15ba45507af840bbcc7667832217064b5318bb445a3e23e6983e757fbab8856491f2320b5af8ac003273f288ed6b58ee96021691f05c533df5f755ed57693dffc60d9f6eb0bcb67fa04962df71333115198e90a6a5ea54d6a10da48ace14abbbe9273f14084925917d5c2a2a9bf9adfecfc17d0cd356418d6bbac201272be81e71a043755b98813bf6f86354dbc1992b4c8be5b459c793c73f28f2c6afd859509c303cd529c8e160270358314169a28e037e9c0def9f4950701de8978bc2874f67ffee2fc2f73bba159d5e8b26ffdda1258e8c862dbf829ca5f8be88e9182a5a9f32387cc964cb387726bdd56399dba8dfe503102088a4d1dadc07e97a464b094e31de84906a5f1c26813569ec3c510224a58fd5c49a172ad69217036078525c1428c54131aec25f02a83c1c6739fba45f1472aca26b55efc2268711076d79f395d17d0c49240ed00e34e8b3e077c633c922329c2a85de75bacdee7e21000fe9d2dc3aa0efed455985d5eb0eb4fa1b5265e26de3d807fd083b451e4c6668bb909832ec5df74d6a07e2c355c30736f1f0d3d7caaf35aa6ba4ac353b3eab8f66a381c4e0da904c23666479a0b1921d8ed19288cc0bf9925e2a86af0f9ee9967b7de61a296d23e47594ff6e745384da6b9cd5e55572e948d054113af793645bff8abc511d280e226cfe98d12e7c86f4f5aee4cf53fcea4425ad3cb1a99022361eb7e12102158f9f948dbee94dbf8495586d6d9a769c0647356c7f80186f4dca573b96476f1b88291329eeb29eebbb6a0",
									// 	"signature":"PAPe5OYetWzKlZD3Wnvi4BPKI6CeCybLmYgzZioIw0XAs7dOdosozY9XXoYDf4cnByiza/JuDvoYQvgh+HYqaCNnJ0G1WnScQ7MSoWGkIcE6FBOxFhsbokLNX2ixiOQ4ERCuozajDsSYpDyOpqvDB4vT5AALyQjXAfnR8GyR/B4=",
									// 	"templateUrl":"http://pinduoduoimg.yangkeduo.com/print_template/2019-08-01/4f0d85f35ca5729ad7df47314c990c31.xml",
									// 	"userid":"480261061",
									// 	"ver":"3"
									// },
									,{
										"data":{
											"height":240,
											"list":[
												{
													"fontSize":31.2,
													"height":45.68,
													"left":2.08,
													"text":remark,
													"top":2.08,
													"width":413.52
												}
											],
											"waterdata":{
												"text":""
											},
											"width":560
										},
										"templateURL":"http://pinduoduoimg.yangkeduo.com/logistics/2019-07-14/5d7e8b5969d954539fcfba3268bbeb3a.xml"
									}
								],
								"documentID":row.expressNo
							}
						],
						"notifyType":[
							"print"
						],
						"preview":false,
						"previewType":"image",
						"printer":"",
						"taskID":"DY"+row.id
					},
					"version":"1.0"
				};
				this.pddSocket.send(JSON.stringify(request));
			},
		},

		beforeDestroy() {}
	}
</script>

<style>

</style>

<style lang="scss" scoped>
	.page{
		text-align: right;
		margin-top: 20px;
	}
</style>
